package com.lwp.ctable.mapper;

import com.lwp.ctable.model.Timeline;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author kaka
 */
@Mapper
public interface TimelineMapper {
    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long id);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(Timeline record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(Timeline record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    Timeline selectByPrimaryKey(Long id);

    List<Timeline> selectByUserId(Long user_id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(Timeline record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(Timeline record);
}